<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    /* reset & test */

    body {
      margin: 0 auto;
    }

    ul,
    li {
      margin: 0 auto;
      padding: 0;
      list-style: none;
    }

    #btn {
      display: block;
      background: #666;
      color: #fff;
      text-align: center;
      padding: 10px 0;
      cursor: pointer;
    }

    #btn:hover {
      background: #999;
    }

    /* main style */

    .layer {
      width: 100%;
      height: 0;
      position: fixed;
      bottom: 0;
      z-index: 50;
      background: #fff;
    }

    .mode {
      width: 100%;
      height: 100%;
      background: #000;
      opacity: .3;
      filter: alpha(opacity=30);
      z-index: 20;
      position: fixed;
      _position: absolute;
      top: 0;
      display: none;
    }

    .layer li {
      padding: 8px 10px;
      border-bottom: 1px solid #eee;
    }

    .layer i {
      border: 1px solid #FF3888;
      padding: 2px 3px;
      color: #FF3888;
      margin-right: 5px;
      border-radius: 5px;
    }

    /* 关闭按钮 */

    .layer .layer-close {
      width: 18px;
      height: 18px;
      position: absolute;
      top: 13px;
      right: 15px;
    }

    .layer .title {
      text-align: center;
    }
  </style>
</head>

<body>
  <a id="btn" onclick="showLayer()">show iframe</a>

  <!-- 层 -->
  <div class="mode" onclick="modeHide()"></div>
  <div class="layer">
    <p class="title">标题</p>
    <img class="layer-close" src="img/icon-layer-close.png" onclick="closeLayer()" />
    <ul>
      <li>
        content 1
      </li>
      <li>
        content 2
      </li>
    </ul>
  </div>

  <script type="text/javascript" src="js/jquery.min.js"></script>
  <script>
    $('.mode').hide();
    function showLayer() {
      $('html').css('overflow', 'hidden');
      $(".layer").animate({
        height: '300px'
      }, [1000]);
      $('.mode').fadeIn();
    }
    function modeHide() {
      $('html').css('overflow', 'scroll');
      $(".layer").animate({
        height: '0'
      }, [1000]);
      $('.mode').fadeOut();
    }
    function closeLayer() {
      $('html').css('overflow', 'scroll');
      $(".layer").animate({
        height: '0'
      }, [1000]);
      $('.mode').fadeOut();
    }
  </script>
</body>

</html>